<%-- 
    Document   : ProductAdding
    Created on : Nov 22, 2012, 4:09:05 PM
    Author     : vupttse
--%>

<%@page import="ass.data.ProductDAL"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Product Adding</title>
    </head>
    <body>
       <% 
        String productId = request.getParameter("productId");
        String productName = request.getParameter("productName");
        String categoryId = request.getParameter("categoryId");
        float unitPrice = Float.parseFloat(request.getParameter("unitPrice"));
        int unitsInStock = Integer.parseInt(request.getParameter("unitsInStock"));
        int unitsInOrder=0;
        String productImage = request.getParameter("productImage");
        String description = request.getParameter("description");
        ProductDAL.insert(productId, productName, categoryId, unitPrice, unitsInStock, unitsInOrder, productImage, description);
        response.sendRedirect("ManageProducts");
        %>
    </body>
</html>
